package com.dilu.common.base;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @author guonima
 * @create 2017-09-06 11:21
 */
public interface BaseMapper<T, ID extends Serializable> {

    public int insert(T t);

    public int insertBatch(List<T> t);

    public int deleteBatchById(List<ID> ids);

    public int deleteById(ID id);

    public int deleteById(String id);

    public int update(T t);

    public T find(Map<String, Object> parameter);

    public T find(T t);

    public T findById(ID id);

    public T findById(String id);

    public T findByName(String name);

    public List<T> queryListAll(Map<String, Object> parameter);

    public List<T> queryListAll(T t);

    public List<Map<String, Object>> queryListByPage(Map<String, Object> parameter);

    public List<T> queryListByPageEntity(Map<String, Object> parameter);

    public int count(Map<String, Object> parameter);

    public int count(T t);
}
